package com.example.gitresp.controller;

import com.example.gitresp.pojo.Dept;
import com.example.gitresp.pojo.Result;
import com.example.gitresp.service.imp.DeptServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DeptController {
    @Autowired
    private DeptServiceImp deptServiceImp;

    @RequestMapping("/deptselectby/{id}")
    public Result selectBYId(@PathVariable Integer id){
        Dept dept = deptServiceImp.selectById(id);
        return Result.success(dept);
    }
}
